//
//  ShopcartOrderTableViewCell.h
//  TerritoryShopkeeper
//
//  Created by 李小龙 on 2017/12/12.
//  Copyright © 2017年 ZDQK. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ShopcartModel.h"

typedef NS_ENUM(NSUInteger, ShopcartOrderClickType) {
    ShopcartOrderClickTypeReceipt,      // 选择发票类型
    ShopcartOrderClickTypeEnterprise,   // 企业发票
    ShopcartOrderClickTypePerson,       // 个人发票
    ShopcartOrderClickTypeFront,        // 身份证前照
    ShopcartOrderClickTypeBack,         // 身份证后照
};

typedef void(^ShopcartOrderBlock)(ShopcartOrderClickType type);
typedef void(^ShopcartEditNote)(NSString *note);

@interface ShopcartOrderTableViewCell : UITableViewCell<UITextViewDelegate>

@property (weak, nonatomic) IBOutlet UIImageView *firstGoodImageView;
@property (weak, nonatomic) IBOutlet UILabel *firstGoodNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *firstGoodCountLabel;
@property (weak, nonatomic) IBOutlet UILabel *firstGoodPriceLabel;
@property (weak, nonatomic) IBOutlet UILabel *firstGoodSpecsLabel;

@property (weak, nonatomic) IBOutlet UILabel *secondTitleLabel;
@property (weak, nonatomic) IBOutlet UILabel *secondCountLabel;
@property (weak, nonatomic) IBOutlet UILabel *secondPriceLabel;

@property (weak, nonatomic) IBOutlet UILabel *thirdTitleLabel;
@property (weak, nonatomic) IBOutlet UILabel *thirdPriceLabel;

@property (weak, nonatomic) IBOutlet SZTextView *fourthTextView;

@property (weak, nonatomic) IBOutlet UILabel *fifthTitleLabel;
@property (weak, nonatomic) IBOutlet UIButton *fifthTypeButton;

@property (weak, nonatomic) IBOutlet UILabel *sixthTitleLabel;
@property (weak, nonatomic) IBOutlet UIButton *sixthEnterpriseButton;
@property (weak, nonatomic) IBOutlet UIButton *sixthPersonButton;

@property (weak, nonatomic) IBOutlet UILabel *seventhTitleLabel;
@property (weak, nonatomic) IBOutlet UITextField *seventhTextField;

@property (weak, nonatomic) IBOutlet UILabel *eighthTitleLabel;
@property (weak, nonatomic) IBOutlet UIImageView *eighthFrontImageView;
@property (weak, nonatomic) IBOutlet UIImageView *eighthBackImageView;

@property (weak, nonatomic) IBOutlet UILabel *ninthTitleLabel;
@property (weak, nonatomic) IBOutlet UILabel *ninthContentLabel;
@property (weak, nonatomic) IBOutlet UILabel *ninthPriceLabel;

@property (nonatomic, copy) ShopcartOrderBlock block;
@property (nonatomic, copy) ShopcartEditNote noteBlock;

/**
 商品列表,单店铺样式（只有一个优惠券）

 @param tableView tableView
 @param indexPath indexPath
 @param count 商品数
 @return ShopcartOrderTableViewCell
 */
+ (instancetype)shopcartOrderCellWith:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath count:(NSInteger)count;

/**
 更新cell数据,单店铺样式（只有一个优惠券 邮费）
 
 @param model 商品model
 @param indexPath indexPath
 @param count 商品数量
 */
- (void)updateGoodCellWith:(ShopcartModel *)model indexPath:(NSIndexPath *)indexPath count:(NSInteger)count;

/**
 商品列表,多店铺样式

 @param tableView tableView
 @param indexPath indexPath
 @param count 当前分类商品数
 @param classifyCount 分类数
 @return ShopcartOrderTableViewCell
 */
+ (instancetype)shopcartOrderCellWith:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath goodsCount:(NSInteger)count classifyCount:(NSInteger)classifyCount;

/**
 更新cell数据,多店铺样式

 @param model 商品model
 @param classifyModel 分类model（用里面自己创建的优惠券、满减model）
 @param indexPath indexPath
 @param count 当前分类商品数
 @param classifyCount 分类数
 */
- (void)updateGoodCellWith:(ShopcartModel *)model classifyModel:(ShopcartClassifyModel *)classifyModel indexPath:(NSIndexPath *)indexPath goodsCount:(NSInteger)count classifyCount:(NSInteger)classifyCount;

@end
